Imports System.Drawing
Imports System.Drawing.Drawing2D

Public Class TriangleTile

    Private Sub TriangleTile_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint

        Const iSide = 50         ' Kích thöôùc cuûa hình tam giaùc

        Dim apt As Point() = {New Point(0, 0), New Point(iSide, 0), New Point(0, iSide)}
        Dim pgbrush As New PathGradientBrush(apt, WrapMode.TileFlipXY)
        Dim cx As Integer = Me.Width
        Dim cy As Integer = Me.Height
        e.Graphics.FillRectangle(pgbrush, 0, 0, cx, cy)
    End Sub

    Private Sub TriangleTile_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
End Class